//
//  OAInfoDetailCell.m
//  OASystem
//
//  Created by zhoupengfei on 15/4/9.
//  Copyright (c) 2015年 zpf. All rights reserved.
//

#import "OAInfoDetailCell.h"

@implementation OAInfoDetailCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
    }
    return self;
    
}

+(instancetype)cellWihtTableView:(UITableView*)tableView{
    NSString * cellIdentifier = @"cellIdentifier";
    OAInfoDetailCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"OAInfoDetailCell" owner:nil options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}

-(void)setIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.section == 0) {
        switch (indexPath.row) {
            case 0:
                self.titleLabel.text = @"文件分类:";
                self.desLabel.text =self.detailModel.category;
                break;
            case 1:
                self.titleLabel.text = @"收文标题:";
                self.desLabel.text =self.detailModel.title;
                break;
            case 2:
                self.titleLabel.text = @"创建时间:";
                self.desLabel.text =self.detailModel.overDate;
                break;
            case 3:
                self.titleLabel.text = @"文件内容:";
                self.desLabel.text = self.detailModel.body;
                break;
            default:
                break;
        }
        
    }else{
        self.titleLabel.text = @"";
        self.desLabel.text =@"";
    }
    
    
}



@end
